<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>我的购物车</title>
    <meta name="viewport"
          content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="/css/Jingle.css">
    <link rel="stylesheet" href="/css/app1.css">
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="my12hui2">
    <tbody>
    <tr>
        <td width="100%" height="50">
            <div align="left"><span style="font-weight:bold;font-size:16px;">&nbsp;&nbsp;金额总计：<span style="color:red">￥
        {{$res['total_money']}}
        </span></span><span style="font-weight:bold;font-size:16px;">&nbsp;&nbsp;</span></div>
        </td>
    </tr>
    </tbody>
</table>

<table width="98%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="e0e0e0" class="my12hui2">
    <form action="{{urlHome('order','postAddOrder')}}" method="post" name="FORM1" id="FORM1"
          onsubmit="return check()">
    <tbody>
    <tr bgcolor="#FFFFFF">
        <td width="20%" height="32">
            <div align="right">姓名：</div>
        </td>
        <td width="80%"><input name="name" type="text" class="input" id="myname" value="{{old('name')}}" size="20"
                               style="border:1px solid #555555;width:80%"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
        <td height="32">
            <div align="right">手机：</div>
        </td>
        <td><input name="mobile" type="text" id="tel" value="{{old('mobile')}}" size="20"
                   style="border:1px solid #555555;width:80%"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
        <td height="32">
            <div align="right">地址：</div>
        </td>
        <td><input name="address" type="text" id="address" size="40" style="border:1px solid #555555;width:80%"
                   value="{{old('address')}}"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
        <td height="28">
            <div align="right">备注：</div>
        </td>
        <td><textarea name="remark" cols="26" rows="6" id="remark" style="width:80%">{{old('remark')}}</textarea></td>
    </tr>
    <tr bgcolor="#FFFFFF">
        <td height="30">
            <div align="center"></div>
        </td>
        <td height="30">
            <div align="left">
                <input type="submit" value="提交订单" class="button block"
                       style="background-color: rgb(0, 0, 0);margin-bottom:10px;width:50%;">
                <input type="hidden" name="num" value="{{$num}}">
                <input type="hidden" name="gid" value="{{$gid}}">
                <input type="button" value="返回修改" class="button block"
                       style="background-color: rgb(0, 0, 0);margin-bottom:10px;width:35%;"
                       onclick="javascript:window.history.go(-1);"></div>
        </td>
    </tr>

    </tbody>
    </form>
</table>

<script type="text/javascript" src="/static/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/static/js/layer/layer.js"></script>
<script>
    message = "{{Session::get('message')}}";
    $(window).ready(function () {
        if (message) {
            layer.msg(message, {
                time: 3000 //2秒关闭（如果不配置，默认是3秒）
            });
        }
    });

    function showmsg(msg) {
        layer.msg(msg, {
            time: 3000 //2秒关闭（如果不配置，默认是3秒）
        });
    }
    
    function check() {
        var name = $('input[name="name"]').val();
        var mobile = $('input[name="mobile"]').val();
        var address = $('input[name="address"]').val();
        if (!name) {
            showmsg('请填写姓名');
            return false;
        }
        if (!mobile) {
            showmsg('请填写手机号');
            return false;
        }
        if (!address) {
            showmsg('请填写收货地址');
            return false;
        }
        return true;
    }

</script>
</body>
</html>